package com.lucweb.entity;

import javax.persistence.*;

@Entity
@Table(name = "task_company", schema = "firesystem", catalog = "")
public class TaskCompany {
    private int id;
    private String companyName;
    private String companyAdress;
    private String companyNumber;
    private String updown;
    private String contractName;
    private String contractTime;
    private String contractPeople;
    private String xmmc;

    @Id
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "companyName", nullable = false, length = 255)
    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    @Basic
    @Column(name = "companyAdress", nullable = true, length = 255)
    public String getCompanyAdress() {
        return companyAdress;
    }

    public void setCompanyAdress(String companyAdress) {
        this.companyAdress = companyAdress;
    }

    @Basic
    @Column(name = "companyNumber", nullable = true, length = 255)
    public String getCompanyNumber() {
        return companyNumber;
    }

    public void setCompanyNumber(String companyNumber) {
        this.companyNumber = companyNumber;
    }

    @Basic
    @Column(name = "updown", nullable = true, length = 255)
    public String getUpdown() {
        return updown;
    }

    public void setUpdown(String updown) {
        this.updown = updown;
    }

    @Basic
    @Column(name = "contractName", nullable = true, length = 255)
    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    @Basic
    @Column(name = "contractTime", nullable = true, length = 255)
    public String getContractTime() {
        return contractTime;
    }

    public void setContractTime(String contractTime) {
        this.contractTime = contractTime;
    }

    @Basic
    @Column(name = "contractPeople", nullable = true, length = 255)
    public String getContractPeople() {
        return contractPeople;
    }

    public void setContractPeople(String contractPeople) {
        this.contractPeople = contractPeople;
    }

    @Basic
    @Column(name = "xmmc", nullable = true, length = 255)
    public String getXmmc() {
        return xmmc;
    }

    public void setXmmc(String xmmc) {
        this.xmmc = xmmc;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaskCompany that = (TaskCompany) o;

        if (id != that.id) return false;
        if (companyName != null ? !companyName.equals(that.companyName) : that.companyName != null) return false;
        if (companyAdress != null ? !companyAdress.equals(that.companyAdress) : that.companyAdress != null)
            return false;
        if (companyNumber != null ? !companyNumber.equals(that.companyNumber) : that.companyNumber != null)
            return false;
        if (updown != null ? !updown.equals(that.updown) : that.updown != null) return false;
        if (contractName != null ? !contractName.equals(that.contractName) : that.contractName != null) return false;
        if (contractTime != null ? !contractTime.equals(that.contractTime) : that.contractTime != null) return false;
        if (contractPeople != null ? !contractPeople.equals(that.contractPeople) : that.contractPeople != null)
            return false;
        if (xmmc != null ? !xmmc.equals(that.xmmc) : that.xmmc != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (companyName != null ? companyName.hashCode() : 0);
        result = 31 * result + (companyAdress != null ? companyAdress.hashCode() : 0);
        result = 31 * result + (companyNumber != null ? companyNumber.hashCode() : 0);
        result = 31 * result + (updown != null ? updown.hashCode() : 0);
        result = 31 * result + (contractName != null ? contractName.hashCode() : 0);
        result = 31 * result + (contractTime != null ? contractTime.hashCode() : 0);
        result = 31 * result + (contractPeople != null ? contractPeople.hashCode() : 0);
        result = 31 * result + (xmmc != null ? xmmc.hashCode() : 0);
        return result;
    }
}
